home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 22
/
Amiga Format AFCD22 (Jan 1998, Issue 106).iso
/
-seriously_amiga-
/
shareware
/
programming
/
other
/
gui4cli
/
tools
/
rtn
/
filepop
< prev
next >
Wrap
Text File
|
1997-11-17
|
3KB
|
147 lines
G4C
; Opens pop-up window to deal with a file
; USE:
; GuiLoad guis:tools/rtn/FilePop FileName -or
; GuiOpen FilePop FileName
; ================================================================
; Globals & system events
; ================================================================
WinBig 0 0 80 90 ""
WinType 00001000
winonmouse 30 7
xonload filename
if $filename > ''
guiopen FilePop $filename
endif
xonreload filename
if $filename > ''
guiopen FilePop $filename
endif
xonopen filename ; just to get the var
xOnRMB
guiclose FilePop
xOnInactive
guiclose FilePop
xOnFail
ezreq "Error during operation" OK ""
xOnQuit
guiquit FilePop2
; ================================================================
; Buttons
; ================================================================
xbutton 0 0 0 15 Auto
guiclose FilePop
guiload guis:tools/rtn/GetFileType $filepop/filename
filetype = $$ret.0
if $filetype > ''
guiload guis:tools/rtn/ViewFile $FilePop/filename $FilePop/filetype RUN
endif
xbutton 0 15 0 15 More..
guiopen FilePop2
guiclose FilePop
xbutton 0 30 0 15 List
guiload guis:tools/read.gc $FilePop/filename
xbutton 0 45 0 15 Cli..
guiclose FilePop
guiload guis:tools/cli.gc $filepop/filename CLI
xbutton 0 60 0 15 'Edit'
ifexists port rexx_ced ; if the CygnusEd editor is running..
ifexists gui cedbar.gc ; use it for the editing
guiscreen cedbar.gc front
else
guiscreen FilePop back ; hoping that Ced is the next screen..
endif
sendrexx rexx_ced 'open new'
sendrexx rexx_ced 'open $filename'
sendrexx rexx_ced 'expand view'
elseifexists variable *DEF.EDITOR
run '$*DEF.EDITOR $filename'
else
run 'c:ed $filename'
endif
guiclose FilePop
xbutton 0 75 0 15 Rx
guiclose FilePop
cli 'rx $filename'
;######################################################################
NEWFILE FilePop2 ; Pop-up on double-click "More.." gui.
; edit this gui to fit your favourites
;######################################################################
WinBig 0 0 80 90 ""
WinType 00001000
winonmouse 30 7
varpath 'FilePop'
xOnRMB
guiclose FilePop2
xOnInactive
guiclose FilePop2
xOnFail
ezreq "Error during operation" OK ""
;---------------> the Buttons
xbutton 0 0 0 15 FRead
guiclose FilePop2
*FRGUIDE = $filename
guiload guis:tools/fastread/fread.gc
xbutton 0 15 0 15 DPaint
guiclose FilePop2
ifexists variable *DEF.PAINT
and $*DEF.PAINT > ' '
run 'wbrun $*DEF.PAINT $filename'
else
GuiLoad guis:tools/rtn/FindFile "DPaintV"
progname = $$ret.0
if $progname > ''
run '$progname $filename'
endif
endif
xbutton 0 30 0 15 'HexView'
ifexists variable *DEF.HEX
run '$*DEF.HEX $filename'
else
cli 'c:type >ram:txt $filename HEX'
guiload guis:tools/read.gc ram:txt
endif
xbutton 0 45 0 15 ''
xbutton 0 60 0 15 ''
xbutton 0 75 0 15 ''